package com.wang.designPattern.factory;

/**
 * @description 类型工厂
 * @Author wangzilong
 * @Date 2025/1/12 11:27
 */
public class ShapeFactory {
    public static Shape getShape(ShapeType shapeType){
        switch (shapeType){
            case CIRCLE:
                return new Circle();
            case RECTANGLE:
                return new Rectangle();
            case SQUARE:
                return new Square();
            default:
                return null;
        }
    }
}
